package z_map;

import java.text.SimpleDateFormat;
import java.util.Date;

public class MapData {
	String userID;
	String irum;
	String phone;
	Date   nal;
	
	public MapData(String id, String irum, String phone){
		this.userID = id;
		this.irum = irum;
		this.phone = phone;
		this.nal = new Date();
	}

	@Override
	public String toString(){
		SimpleDateFormat sd =
			new SimpleDateFormat("yyyy-MM-dd (hh:mm)");
		String temp = sd.format(nal);
		String str = 
			String.format("%-16s%-16s%-16s%-18s\n", 
						userID, irum, phone, temp);
		return str;
	}
	
	public String toString2(){
		SimpleDateFormat sd =
				new SimpleDateFormat("yyyy-MM-dd");
		String d = sd.format(nal);
		
		String temp = "아이디 : " + userID +
				"\n성명 : " + irum +
				"\n연락처 : " + phone +
				"\n날짜 : " + d;
		
		return temp;
	}
	
	public String getUserID() {
		return userID;
	}

	public void setUserID(String userID) {
		this.userID = userID;
	}

	public String getIrum() {
		return irum;
	}

	public void setIrum(String irum) {
		this.irum = irum;
	}

	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}
	
	
}
